<?php

use Illuminate\Support\Facades\Route;

/**
 * 网站首页
 */
Route::get('/', function () {
    return redirect('https://www.toysmodel.cn/RbhWeb');
});

/**
 * APP下载
 */
Route::get('/apps', function () {
    return redirect('https://erp.toysmodel.cn:11443/rbh_app');
});

/**
 * 404
 */
Route::any('404', function () {
    $message = request()->get('message');
    return '404:' . $message;
});

Route::any('law', \App\Http\Controllers\DataV\LawDataVController::class.'@viewPage');

Route::any('PicSum', PCApiController::class.'@total');

Route::any('PicQuerySumDB', PCApiController::class.'@getList');

Route::any('PicQueryDB', PCApiController::class.'@getPicDetail');

Route::any('addFav', PCApiController::class.'@addFavourite');

Route::any('queryFav', PCApiController::class.'@queryFav');

Route::any('delFav', PCApiController::class.'@delFav');

Route::any('updatePic', PCApiController::class.'@updatePicInfo');

Route::any('cleanMySqlData', function () {
    \Illuminate\Support\Facades\DB::connection('rbh')->table('payrec')->limit(10000)->delete();
    \Illuminate\Support\Facades\DB::connection('rbh')->table('payrec_pre')->limit(10000)->delete();
});

